﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="CSP.Web.MyHome.ServiceManage.WebForm1" %>

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>树节点查询</title>

    <script src="http://ui.operamasks.org/jquery.js" type="text/javascript"></script>
    <script type="text/javascript" src="http://ui.operamasks.org/ui/om-core.js"></script>
    <script type="text/javascript" src="http://ui.operamasks.org/ui/om-tree.js"></script>
    <script src="http://ui.operamasks.org/ui/om-mouse.js"></script>
    <script src="http://ui.operamasks.org/ui/om-resizable.js"></script>
    <script type="text/javascript" src="http://ui.operamasks.org/ui/om-grid.js"></script>
    <link rel="stylesheet" type="text/css" href="http://ui.operamasks.org/themes/default/om-all.css" />
    <link rel="stylesheet" type="text/css" href="http://ui.operamasks.org/demos/common/css/base.css" />
    <link rel="stylesheet" href="http://ui.operamasks.org/demos/common/css/demo.css">
    <!-- view_source_begin -->
    <script type="text/javascript">
        var typedata = [{
            "text": "个人",
            "value":"52",
            "expanded": true,
            "children": [{
                "text": "在职时间", "value": "69"
            }, {
                "text": "社保限制", "value": "78"
            }, {
                "text": "公积金限制", "value": "84"
            }, {
                "text": "家庭资产限制", "value": "88"
            }, {
                "text": "工资发放形式", "value": "92"
            }, {
                "text": "户籍", "value": "130"
            }, {
                "text": "单位性质限制", "value": "139"
            },
            {
                "text": "房产类型限制", "value": "193"
            }]
        }, {
            "text": "企业",
            "value": "53",
            "expanded": true,
            "children": [{
                "text": "经营注册地", "value": "55"
            }, {
                "text": "经营年限", "value": "58"
            }, {
                "text": "企业注册时间", "value": "149"
            }, {
                "text": "企业实际经营时间", "value": "156"
            }, {
                "text": "占股比例限制", "value": "179"
            }, {
                "text": "家人是否知晓", "value": "185"
            }, {
                "text": "每月经营收入", "value": "188"
            }]
        }, {
            "text": "年龄段",
            "expanded": true,
            "value": "52",
        },
        {
            "text": "名下房产",
            "expanded": true,
            "value": "52",
        },
        {
            "text": "名下车辆",
            "expanded": true,
            "value": "52",
        },
        {
            "text": "个人信用",
            "expanded": true,
            "value": "52",
        }, {
            "text": "提供资料",
            "expanded": true,
            "value": "52",
        }, ];

    </script>

    <script type="text/javascript">
        $(document).ready(function () {
            $("#navtree").omTree({
                dataSource: typedata,
                onSelect: function (nodedata) {
                    if (!nodedata.children && nodedata.value) {
                        //避免在IE浏览器下出现中文乱码
                        var url = encodeURI("http://localhost/MyHome/ServiceManage/getdata.aspx?id=" + nodedata.value);
                        $("#grid").omGrid("setData", url);
                    } else {
                        $("#grid").omGrid("setData", "http://localhost/MyHome/ServiceManage/getdata.aspx");
                    }
                }
            });
            $('#grid').omGrid({
                dataSource: 'http://localhost/MyHome/ServiceManage/data.txt',
                limit: 10,
                height: 330,
                width: 500,
                colModel: [{ header: 'ID', name: 'id', width: 80, align: 'center' },
                             { header: '地区', name: 'city', width: 130, align: 'left' },
                             { header: '地址', name: 'address', align: 'left', width: 180 }]
            });
        });
    </script>
    <!-- view_source_end -->
    <style type="text/css">
        #body-table {
            width: 660px;
        }
    </style>
</head>
<body>
    <!-- view_source_begin -->
    <div id="content" class="content">
        <table id="body-table">
            <tr>
                <td class="left-panel" valign="top">
                    <ul id="navtree">
                    </ul>
                </td>
                <td class="center-panel" valign="top">
                    <div style="float: left;">
                        <table id="grid"></table>
                    </div>

                </td>
            </tr>
        </table>
    </div>
    <!-- view_source_end -->

</body>
</html>
